package com.jml.juc.feature手写模式;

//FutureClient  客户端
public class FutureClient {

    public Data request(final String queryStr) {
        final FurureData furureData = new FurureData();
        new Thread(new Runnable() {
            @Override
            public void run() {
                //这个数据是获取真实的数据，会耗时
                RealData realData = new RealData(queryStr);
                //把真实的数据放入假数据中
                furureData.setRealData(realData);
            }
        }).start();
        return furureData;
    }
}
